package com.pj.compose.ui.page.main


import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.NavController
import com.pj.compose.R
import com.pj.compose.model.TextIconEntity
import com.pj.compose.ui.compose.CommonTopBar
import com.pj.compose.ui.compose.MainGridView

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun AppPage(navController: NavController) {
    val gridItems = listOf(
        TextIconEntity("第一页", R.drawable.ic_tab_app),
        TextIconEntity("第二页", R.drawable.ic_tab_app),
        TextIconEntity("第三页", R.drawable.ic_tab_app),
        TextIconEntity("第四页", R.drawable.ic_tab_app),
        TextIconEntity("第五页", R.drawable.ic_tab_app),
        TextIconEntity("第六页", R.drawable.ic_tab_app),
    )
    Scaffold(
        modifier = Modifier.fillMaxSize(),
        topBar = {
            CommonTopBar(title = "界面", useBack = false)
        }) { padding ->
        Column(modifier = Modifier.padding(padding)) {
            MainGridView(items = gridItems) {}
        }
    }
}